/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/*
 * CharacterBuilder1.java
 *
 * Created on 26/10/2011, 16:57:08
 */
package clientApp;

import java.awt.Color;
import java.util.ArrayList;

import javax.swing.JDialog;
import javax.swing.JOptionPane;

import clientApp.utils.RPG_Workstation_Container;
import game.units.Attribute;
import game.units.Monster;
import game.enums.Alignment;
import game.enums.Size;
import game.mechanics.Item;
import game.referenceValues.*;

/**
 *
 * @author Gabriel
 */
public class ItemCreator extends javax.swing.JPanel {

	
	RPG_Workstation_Container container;
	RPG_Workstation frame;
	private Monster monster;
	
	boolean item = true;
	boolean equip = false;
	boolean weapon = false;
	
	String[] aligns = new String[9];
	String[] sizes = new String[4];
	String[] itens = new String[1];
	String[] races = new String[1];
	Alignment[] alignEnum = Alignment.values();
	Size[] sizeEnum = Size.values();
	ArrayList<String> raceList = new ArrayList<String>();
	ArrayList<Item> itemList = new ArrayList<Item>();
	ArrayList<Item> loot = new ArrayList<Item>();
	ArrayList<String> powers = new ArrayList<String>();
	
    /** Creates new form CharacterBuilder1 */
    public ItemCreator(RPG_Workstation frame, RPG_Workstation_Container rpg_Workstation_Container, Monster monster) {
    	this.frame = frame;
    	this.monster = monster;
    	container = rpg_Workstation_Container;
    	initComponents();
        initObjects();
   
    
	}

	private void initObjects()
    {		
		for (int i = 0; i < alignEnum.length; i++ ) 	
		{
			aligns[i] = alignEnum[i].name();
		}
		for (int i = 0; i < sizeEnum.length; i++ ) 	
		{
			sizes[i] = sizeEnum[i].name();
		}
		Race raceGetter = new Race();
		raceList = raceGetter.getMonsterRaces();
		races = new String[raceList.size()];
		Item itemGetter = new Item();
		itemList = itemGetter.getItemList();
		itens = new String[itemList.size()];
		
		for (int i = 0; i < raceList.size(); i++ ) 	
		{
			races[i] = raceList.get(i);
		}
		for (int i = 0; i < itemList.size(); i++ ) 	
		{
			itens[i] = itemList.get(i).getName();
		}

        jCBEquipSlot.setModel(new javax.swing.DefaultComboBoxModel(aligns));

       
	}

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jLabel9 = new javax.swing.JLabel();
        jSeparator3 = new javax.swing.JSeparator();
        jSeparator4 = new javax.swing.JSeparator();
        jLabel3 = new javax.swing.JLabel();
        jTFName = new javax.swing.JTextField();
        jScrollPane2 = new javax.swing.JScrollPane();
        jTADesc = new javax.swing.JTextArea();
        jLabel17 = new javax.swing.JLabel();
        jPanelEquip = new javax.swing.JPanel();
        jLabel4 = new javax.swing.JLabel();
        jCBEquipSlot = new javax.swing.JComboBox();
        jScrollPane1 = new javax.swing.JScrollPane();
        jLAttBonus = new javax.swing.JList();
        jLabel5 = new javax.swing.JLabel();
        jCBAttributes = new javax.swing.JComboBox();
        jBAddAttBonus = new javax.swing.JButton();
        jBRemoveAttBonus = new javax.swing.JButton();
        jLabel6 = new javax.swing.JLabel();
        jTFWeight = new javax.swing.JTextField();
        jLabel7 = new javax.swing.JLabel();
        jTFAC = new javax.swing.JTextField();
        jLabel8 = new javax.swing.JLabel();
        jTFDexBonus = new javax.swing.JTextField();
        jPanel2 = new javax.swing.JPanel();
        jLabel10 = new javax.swing.JLabel();
        jScrollPane3 = new javax.swing.JScrollPane();
        jLFeats = new javax.swing.JList();
        jBAddFeats = new javax.swing.JButton();
        jBRemoveFeats = new javax.swing.JButton();
        jScrollPane4 = new javax.swing.JScrollPane();
        jLReqList = new javax.swing.JList();
        jLabel11 = new javax.swing.JLabel();
        jBEquip = new javax.swing.JButton();
        jBWeapon = new javax.swing.JButton();
        jPanelWeapon = new javax.swing.JPanel();
        jLabel12 = new javax.swing.JLabel();
        jLabel13 = new javax.swing.JLabel();
        jCBDie = new javax.swing.JComboBox();
        jLabel14 = new javax.swing.JLabel();
        jLabel15 = new javax.swing.JLabel();
        jTFDmgTyoe = new javax.swing.JTextField();
        jLabel16 = new javax.swing.JLabel();
        jTFDmgValue = new javax.swing.JTextField();
        jLabel18 = new javax.swing.JLabel();
        jLabel19 = new javax.swing.JLabel();
        jLabel20 = new javax.swing.JLabel();
        jLabel21 = new javax.swing.JLabel();
        jTFHands = new javax.swing.JTextField();
        jTFRange = new javax.swing.JTextField();
        jTFCritMult = new javax.swing.JTextField();
        jTFMinCritValue = new javax.swing.JTextField();
        jBSave = new javax.swing.JButton();
        jBReset = new javax.swing.JButton();
        jBItem = new javax.swing.JButton();

        setBackground(new java.awt.Color(0, 0, 102));

        jLabel9.setFont(new java.awt.Font("Tahoma", 0, 28));
        jLabel9.setForeground(new java.awt.Color(255, 255, 255));
        jLabel9.setText("Item Creator");

        jLabel3.setFont(new java.awt.Font("Tahoma", 0, 12));
        jLabel3.setForeground(new java.awt.Color(255, 255, 255));
        jLabel3.setText("Name:");

        jTADesc.setColumns(20);
        jTADesc.setRows(5);
        jScrollPane2.setViewportView(jTADesc);

        jLabel17.setFont(new java.awt.Font("Tahoma", 0, 12));
        jLabel17.setForeground(new java.awt.Color(255, 255, 255));
        jLabel17.setText("Description:");

        jPanelEquip.setBackground(new java.awt.Color(0, 0, 102));
        jPanelEquip.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "  Equip Parameters  ", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Tahoma", 0, 12), java.awt.Color.white)); // NOI18N

        jLabel4.setFont(new java.awt.Font("Tahoma", 0, 12));
        jLabel4.setForeground(new java.awt.Color(255, 255, 255));
        jLabel4.setText("Equip Slot:");

        jCBEquipSlot.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Item 1", "Item 2", "Item 3", "Item 4" }));

        jLAttBonus.setModel(new javax.swing.AbstractListModel() {
            String[] strings = { "Item 1", "Item 2", "Item 3", "Item 4", "Item 5" };
            public int getSize() { return strings.length; }
            public Object getElementAt(int i) { return strings[i]; }
        });
        jScrollPane1.setViewportView(jLAttBonus);

        jLabel5.setFont(new java.awt.Font("Tahoma", 0, 12));
        jLabel5.setForeground(new java.awt.Color(255, 255, 255));
        jLabel5.setText("Attribute Bonus:");

        jCBAttributes.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Item 1", "Item 2", "Item 3", "Item 4" }));

        jBAddAttBonus.setText("Add");
        jBAddAttBonus.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jBAddAttBonusActionPerformed(evt);
            }
        });

        jBRemoveAttBonus.setText("Remove");
        jBRemoveAttBonus.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jBRemoveAttBonusActionPerformed(evt);
            }
        });

        jLabel6.setFont(new java.awt.Font("Tahoma", 0, 12));
        jLabel6.setForeground(new java.awt.Color(255, 255, 255));
        jLabel6.setText("Weight:");

        jLabel7.setFont(new java.awt.Font("Tahoma", 0, 12));
        jLabel7.setForeground(new java.awt.Color(255, 255, 255));
        jLabel7.setText("Armor Class:");

        jLabel8.setFont(new java.awt.Font("Tahoma", 0, 12));
        jLabel8.setForeground(new java.awt.Color(255, 255, 255));
        jLabel8.setText("Max Dexterity Bonus:");

        jPanel2.setBackground(new java.awt.Color(0, 0, 102));
        jPanel2.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Requirements", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Tahoma", 0, 12), java.awt.Color.white)); // NOI18N

        jLabel10.setFont(new java.awt.Font("Tahoma", 0, 12));
        jLabel10.setForeground(new java.awt.Color(255, 255, 255));
        jLabel10.setText("Feat List:");

        jLFeats.setModel(new javax.swing.AbstractListModel() {
            String[] strings = { "Item 1", "Item 2", "Item 3", "Item 4", "Item 5" };
            public int getSize() { return strings.length; }
            public Object getElementAt(int i) { return strings[i]; }
        });
        jScrollPane3.setViewportView(jLFeats);

        jBAddFeats.setText("Add");
        jBAddFeats.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jBAddFeatsActionPerformed(evt);
            }
        });

        jBRemoveFeats.setText("Remove");
        jBRemoveFeats.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jBRemoveFeatsActionPerformed(evt);
            }
        });

        jLReqList.setModel(new javax.swing.AbstractListModel() {
            String[] strings = { "Item 1", "Item 2", "Item 3", "Item 4", "Item 5" };
            public int getSize() { return strings.length; }
            public Object getElementAt(int i) { return strings[i]; }
        });
        jScrollPane4.setViewportView(jLReqList);

        jLabel11.setFont(new java.awt.Font("Tahoma", 0, 12));
        jLabel11.setForeground(new java.awt.Color(255, 255, 255));
        jLabel11.setText("Requirement List:");

        javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);
        jPanel2.setLayout(jPanel2Layout);
        jPanel2Layout.setHorizontalGroup(
            jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel2Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel2Layout.createSequentialGroup()
                        .addComponent(jScrollPane3, javax.swing.GroupLayout.PREFERRED_SIZE, 191, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jBRemoveFeats)
                            .addComponent(jBAddFeats)))
                    .addComponent(jLabel10))
                .addGap(10, 10, 10)
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jScrollPane4, javax.swing.GroupLayout.DEFAULT_SIZE, 187, Short.MAX_VALUE)
                    .addComponent(jLabel11))
                .addContainerGap())
        );

        jPanel2Layout.linkSize(javax.swing.SwingConstants.HORIZONTAL, new java.awt.Component[] {jBAddFeats, jBRemoveFeats});

        jPanel2Layout.setVerticalGroup(
            jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel2Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel10)
                    .addComponent(jLabel11))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jScrollPane4, javax.swing.GroupLayout.PREFERRED_SIZE, 82, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addGroup(jPanel2Layout.createSequentialGroup()
                        .addComponent(jBAddFeats)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(jBRemoveFeats))
                    .addComponent(jScrollPane3, javax.swing.GroupLayout.PREFERRED_SIZE, 82, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap())
        );

        javax.swing.GroupLayout jPanelEquipLayout = new javax.swing.GroupLayout(jPanelEquip);
        jPanelEquip.setLayout(jPanelEquipLayout);
        jPanelEquipLayout.setHorizontalGroup(
            jPanelEquipLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanelEquipLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanelEquipLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                    .addComponent(jScrollPane1, javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(javax.swing.GroupLayout.Alignment.LEADING, jPanelEquipLayout.createSequentialGroup()
                        .addComponent(jBAddAttBonus)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addComponent(jBRemoveAttBonus))
                    .addGroup(jPanelEquipLayout.createSequentialGroup()
                        .addComponent(jLabel4)
                        .addGap(18, 18, 18)
                        .addComponent(jCBEquipSlot, javax.swing.GroupLayout.PREFERRED_SIZE, 186, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(jPanelEquipLayout.createSequentialGroup()
                        .addComponent(jLabel5)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addComponent(jCBAttributes, javax.swing.GroupLayout.PREFERRED_SIZE, 144, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addGap(18, 18, 18)
                .addGroup(jPanelEquipLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addGroup(jPanelEquipLayout.createSequentialGroup()
                        .addGroup(jPanelEquipLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                            .addGroup(jPanelEquipLayout.createSequentialGroup()
                                .addComponent(jLabel6)
                                .addGap(18, 18, 18)
                                .addComponent(jTFWeight, javax.swing.GroupLayout.PREFERRED_SIZE, 157, javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addGroup(jPanelEquipLayout.createSequentialGroup()
                                .addComponent(jLabel8)
                                .addGap(18, 18, 18)
                                .addComponent(jTFDexBonus)))
                        .addGap(18, 18, 18)
                        .addComponent(jLabel7)
                        .addGap(18, 18, 18)
                        .addComponent(jTFAC, javax.swing.GroupLayout.PREFERRED_SIZE, 178, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addComponent(jPanel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addContainerGap(16, Short.MAX_VALUE))
        );
        jPanelEquipLayout.setVerticalGroup(
            jPanelEquipLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanelEquipLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanelEquipLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel4)
                    .addComponent(jCBEquipSlot, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel6)
                    .addComponent(jTFWeight, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel7)
                    .addComponent(jTFAC, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(18, 18, 18)
                .addGroup(jPanelEquipLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel5)
                    .addComponent(jCBAttributes, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel8)
                    .addComponent(jTFDexBonus, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 56, Short.MAX_VALUE)
                .addGroup(jPanelEquipLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanelEquipLayout.createSequentialGroup()
                        .addGroup(jPanelEquipLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jBAddAttBonus)
                            .addComponent(jBRemoveAttBonus))
                        .addGap(18, 18, 18)
                        .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 82, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addComponent(jPanel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addContainerGap())
        );

        jBEquip.setText("Equip");
        jBEquip.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jBEquipActionPerformed(evt);
            }
        });

        jBWeapon.setText("Weapon");
        jBWeapon.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jBWeaponActionPerformed(evt);
            }
        });

        jPanelWeapon.setBackground(new java.awt.Color(0, 0, 102));
        jPanelWeapon.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "  Weapon Parameters  ", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Tahoma", 0, 12), java.awt.Color.white)); // NOI18N

        jLabel12.setFont(new java.awt.Font("Tahoma", 0, 14));
        jLabel12.setForeground(new java.awt.Color(255, 255, 255));
        jLabel12.setText("Damage:");

        jLabel13.setFont(new java.awt.Font("Tahoma", 0, 12));
        jLabel13.setForeground(new java.awt.Color(255, 255, 255));
        jLabel13.setText("Damage Die:");

        jCBDie.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Item 1", "Item 2", "Item 3", "Item 4" }));

        jLabel14.setFont(new java.awt.Font("Tahoma", 0, 14));
        jLabel14.setForeground(new java.awt.Color(255, 255, 255));
        jLabel14.setText("Damage Bonus:");

        jLabel15.setFont(new java.awt.Font("Tahoma", 0, 12));
        jLabel15.setForeground(new java.awt.Color(255, 255, 255));
        jLabel15.setText("Type:");

        jLabel16.setFont(new java.awt.Font("Tahoma", 0, 12));
        jLabel16.setForeground(new java.awt.Color(255, 255, 255));
        jLabel16.setText("Value:");

        jLabel18.setFont(new java.awt.Font("Tahoma", 0, 12));
        jLabel18.setForeground(new java.awt.Color(255, 255, 255));
        jLabel18.setText("Min Critical Value:");

        jLabel19.setFont(new java.awt.Font("Tahoma", 0, 12));
        jLabel19.setForeground(new java.awt.Color(255, 255, 255));
        jLabel19.setText("Critical Multiplier:");

        jLabel20.setFont(new java.awt.Font("Tahoma", 0, 12));
        jLabel20.setForeground(new java.awt.Color(255, 255, 255));
        jLabel20.setText("Range:");

        jLabel21.setFont(new java.awt.Font("Tahoma", 0, 12));
        jLabel21.setForeground(new java.awt.Color(255, 255, 255));
        jLabel21.setText("Hands:");

        javax.swing.GroupLayout jPanelWeaponLayout = new javax.swing.GroupLayout(jPanelWeapon);
        jPanelWeapon.setLayout(jPanelWeaponLayout);
        jPanelWeaponLayout.setHorizontalGroup(
            jPanelWeaponLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanelWeaponLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanelWeaponLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addGroup(jPanelWeaponLayout.createSequentialGroup()
                        .addComponent(jLabel12)
                        .addGap(18, 18, 18)
                        .addComponent(jLabel13)
                        .addGap(18, 18, 18)
                        .addComponent(jCBDie, javax.swing.GroupLayout.PREFERRED_SIZE, 176, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(18, 18, 18)
                        .addComponent(jLabel14)
                        .addGap(18, 18, 18)
                        .addComponent(jLabel15)
                        .addGap(18, 18, 18)
                        .addComponent(jTFDmgTyoe, javax.swing.GroupLayout.PREFERRED_SIZE, 96, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(18, 18, 18)
                        .addComponent(jLabel16)
                        .addGap(18, 18, 18)
                        .addComponent(jTFDmgValue, javax.swing.GroupLayout.PREFERRED_SIZE, 96, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(jPanelWeaponLayout.createSequentialGroup()
                        .addComponent(jLabel18)
                        .addGap(18, 18, 18)
                        .addComponent(jTFMinCritValue, javax.swing.GroupLayout.PREFERRED_SIZE, 102, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addComponent(jLabel19)
                        .addGap(18, 18, 18)
                        .addComponent(jTFCritMult, javax.swing.GroupLayout.PREFERRED_SIZE, 73, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(18, 18, 18)
                        .addComponent(jLabel20)
                        .addGap(18, 18, 18)
                        .addComponent(jTFRange, javax.swing.GroupLayout.PREFERRED_SIZE, 73, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(18, 18, 18)
                        .addComponent(jLabel21)
                        .addGap(18, 18, 18)
                        .addComponent(jTFHands, javax.swing.GroupLayout.PREFERRED_SIZE, 73, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addContainerGap(15, Short.MAX_VALUE))
        );

        jPanelWeaponLayout.linkSize(javax.swing.SwingConstants.HORIZONTAL, new java.awt.Component[] {jTFCritMult, jTFHands, jTFMinCritValue, jTFRange});

        jPanelWeaponLayout.setVerticalGroup(
            jPanelWeaponLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanelWeaponLayout.createSequentialGroup()
                .addGroup(jPanelWeaponLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanelWeaponLayout.createSequentialGroup()
                        .addGap(23, 23, 23)
                        .addGroup(jPanelWeaponLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jLabel13)
                            .addComponent(jCBDie, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jLabel15)
                            .addComponent(jTFDmgTyoe, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jLabel16)
                            .addComponent(jTFDmgValue, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                    .addGroup(jPanelWeaponLayout.createSequentialGroup()
                        .addContainerGap()
                        .addGroup(jPanelWeaponLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jLabel14)
                            .addComponent(jLabel12))))
                .addGroup(jPanelWeaponLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanelWeaponLayout.createSequentialGroup()
                        .addGap(12, 12, 12)
                        .addComponent(jLabel18))
                    .addGroup(jPanelWeaponLayout.createSequentialGroup()
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addGroup(jPanelWeaponLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jTFHands, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jLabel21)
                            .addComponent(jTFRange, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jLabel20)
                            .addComponent(jTFCritMult, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jLabel19)
                            .addComponent(jTFMinCritValue, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        jBSave.setText("Save");
        jBSave.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jBSaveActionPerformed(evt);
            }
        });

        jBReset.setText("Reset");
        jBReset.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jBResetActionPerformed(evt);
            }
        });

        jBItem.setText("Item");
        jBItem.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jBItemActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
        this.setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(jPanelWeapon, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(jPanelEquip, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(jSeparator4, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 820, Short.MAX_VALUE)
                    .addGroup(javax.swing.GroupLayout.Alignment.LEADING, layout.createSequentialGroup()
                        .addComponent(jLabel9)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(jSeparator3, javax.swing.GroupLayout.DEFAULT_SIZE, 652, Short.MAX_VALUE))
                    .addGroup(javax.swing.GroupLayout.Alignment.LEADING, layout.createSequentialGroup()
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                            .addGroup(layout.createSequentialGroup()
                                .addComponent(jLabel3)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                .addComponent(jTFName, javax.swing.GroupLayout.PREFERRED_SIZE, 143, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addGap(18, 18, 18)
                                .addComponent(jLabel17))
                            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
                                .addComponent(jBItem)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                .addComponent(jBEquip)
                                .addGap(41, 41, 41)
                                .addComponent(jBWeapon)))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(jScrollPane2, javax.swing.GroupLayout.DEFAULT_SIZE, 540, Short.MAX_VALUE))
                    .addGroup(layout.createSequentialGroup()
                        .addComponent(jBReset, javax.swing.GroupLayout.PREFERRED_SIZE, 80, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(jBSave, javax.swing.GroupLayout.PREFERRED_SIZE, 80, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addContainerGap())
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(jLabel9)
                    .addComponent(jSeparator3, javax.swing.GroupLayout.PREFERRED_SIZE, 10, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jSeparator4, javax.swing.GroupLayout.PREFERRED_SIZE, 10, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(layout.createSequentialGroup()
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jLabel3)
                            .addComponent(jTFName, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jLabel17))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 54, Short.MAX_VALUE)
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jBWeapon)
                            .addComponent(jBEquip)
                            .addComponent(jBItem)))
                    .addComponent(jScrollPane2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(18, 18, 18)
                .addComponent(jPanelEquip, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(jPanelWeapon, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(85, 85, 85)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jBSave)
                    .addComponent(jBReset))
                .addContainerGap())
        );
    }// </editor-fold>//GEN-END:initComponents

    private void jBEquipActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jBEquipActionPerformed
        if(!equip)
        {
        	jPanelEquip.setVisible(true);
            jPanelWeapon.setVisible(false);
            item = false;
        	equip = true;
        	weapon = false;
        }
        else
        {
        	jPanelEquip.setVisible(false);
            jPanelWeapon.setVisible(false);
            item = true;
        	equip = false;
        	weapon = false;
        }
    	
    }//GEN-LAST:event_jBEquipActionPerformed

    private void jBWeaponActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jBWeaponActionPerformed
       	if(!weapon)
        {
    		jPanelEquip.setVisible(true);
            jPanelWeapon.setVisible(true);
            item = false;
        	equip = true;
        	weapon = false;
        }
        else
        {
        	jPanelEquip.setVisible(false);
            jPanelWeapon.setVisible(false);
            item = true;
        	equip = false;
        	weapon = false;
        }
    }//GEN-LAST:event_jBWeaponActionPerformed

    private void jBItemActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jBItemActionPerformed
    	if(!item)
        {
    		jPanelEquip.setVisible(false);
            jPanelWeapon.setVisible(false);
            item = true;
        	equip = false;
        	weapon = false;
        }
    }//GEN-LAST:event_jBItemActionPerformed

    private void jBAddAttBonusActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jBAddAttBonusActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_jBAddAttBonusActionPerformed

    private void jBRemoveAttBonusActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jBRemoveAttBonusActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_jBRemoveAttBonusActionPerformed

    private void jBAddFeatsActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jBAddFeatsActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_jBAddFeatsActionPerformed

    private void jBRemoveFeatsActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jBRemoveFeatsActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_jBRemoveFeatsActionPerformed

    private void jBResetActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jBResetActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_jBResetActionPerformed

    private void jBSaveActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jBSaveActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_jBSaveActionPerformed

    




    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton jBAddAttBonus;
    private javax.swing.JButton jBAddFeats;
    private javax.swing.JButton jBEquip;
    private javax.swing.JButton jBItem;
    private javax.swing.JButton jBRemoveAttBonus;
    private javax.swing.JButton jBRemoveFeats;
    private javax.swing.JButton jBReset;
    private javax.swing.JButton jBSave;
    private javax.swing.JButton jBWeapon;
    private javax.swing.JComboBox jCBAttributes;
    private javax.swing.JComboBox jCBDie;
    private javax.swing.JComboBox jCBEquipSlot;
    private javax.swing.JList jLAttBonus;
    private javax.swing.JList jLFeats;
    private javax.swing.JList jLReqList;
    private javax.swing.JLabel jLabel10;
    private javax.swing.JLabel jLabel11;
    private javax.swing.JLabel jLabel12;
    private javax.swing.JLabel jLabel13;
    private javax.swing.JLabel jLabel14;
    private javax.swing.JLabel jLabel15;
    private javax.swing.JLabel jLabel16;
    private javax.swing.JLabel jLabel17;
    private javax.swing.JLabel jLabel18;
    private javax.swing.JLabel jLabel19;
    private javax.swing.JLabel jLabel20;
    private javax.swing.JLabel jLabel21;
    private javax.swing.JLabel jLabel3;
    private javax.swing.JLabel jLabel4;
    private javax.swing.JLabel jLabel5;
    private javax.swing.JLabel jLabel6;
    private javax.swing.JLabel jLabel7;
    private javax.swing.JLabel jLabel8;
    private javax.swing.JLabel jLabel9;
    private javax.swing.JPanel jPanel2;
    private javax.swing.JPanel jPanelEquip;
    private javax.swing.JPanel jPanelWeapon;
    private javax.swing.JScrollPane jScrollPane1;
    private javax.swing.JScrollPane jScrollPane2;
    private javax.swing.JScrollPane jScrollPane3;
    private javax.swing.JScrollPane jScrollPane4;
    private javax.swing.JSeparator jSeparator3;
    private javax.swing.JSeparator jSeparator4;
    private javax.swing.JTextArea jTADesc;
    private javax.swing.JTextField jTFAC;
    private javax.swing.JTextField jTFCritMult;
    private javax.swing.JTextField jTFDexBonus;
    private javax.swing.JTextField jTFDmgTyoe;
    private javax.swing.JTextField jTFDmgValue;
    private javax.swing.JTextField jTFHands;
    private javax.swing.JTextField jTFMinCritValue;
    private javax.swing.JTextField jTFName;
    private javax.swing.JTextField jTFRange;
    private javax.swing.JTextField jTFWeight;
    // End of variables declaration//GEN-END:variables
}
